package com.mcxx.modules.miniSalvation.salary.service.read;

import com.mcxx.modules.base.utils.QueryParamUtil;
import com.mcxx.modules.miniSalvation.family.dto.MiniFamilyChangeExcelDTO;
import com.mcxx.modules.miniSalvation.family.dto.SalvationFamilyChangeDTO;
import com.mcxx.modules.miniSalvation.family.param.SalvationFamilyChangeParam;
import com.mcxx.modules.miniSalvation.salary.dao.read.FamilySalaryChangeReadDao;
import com.yinhai.ta404.core.restservice.requestbean.PageParam;
import com.yinhai.ta404.core.restservice.resultbean.Page;
import com.yinhai.ta404.core.security.vo.UserAccountVo;
import com.yinhai.ta404.core.transaction.annotation.TaTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("salaryChangeReadService")
@TaTransactional(readOnly = true)
public class FamilySalaryChangeReadService {
    @Autowired
    FamilySalaryChangeReadDao familySalaryChangeReadDao;


    public Page<SalvationFamilyChangeDTO> getSalvationFamilyList(SalvationFamilyChangeParam param, PageParam pageParam, UserAccountVo accountVo) {

        QueryParamUtil.setBaseParamValue(param,accountVo);


        familySalaryChangeReadDao.beginPager(pageParam);
        List<SalvationFamilyChangeDTO> list = familySalaryChangeReadDao.getSalvationFamilyList(param);


        return familySalaryChangeReadDao.endPager(list);
    }


    public List<MiniFamilyChangeExcelDTO> exportMiniFamilyChangeList(SalvationFamilyChangeParam param){ return familySalaryChangeReadDao.exportMiniFamilyChangeList(param);}


    public List<MiniFamilyChangeExcelDTO> exportMiniMemberChangeList(SalvationFamilyChangeParam param){ return familySalaryChangeReadDao.exportMiniMemberChangeList(param);}

}
